<?php

/*
 * 管理主頁
 *
 */

class IndexAction extends AdminAction {

    public function index() {
        if ($_SESSION[C('ADMIN_SESSION_KEY')]) {
            $this->redirect('Index/index');
        } else {
            $this->display();
        }
        /* 菜单数组 */
        $menu = array(
            array(
                'id' => 0,
                'top_title' => '网站文章管理',
                'display' => 'block',
                'list' => array(
                    array('link' => U('Admin-Article/editArticle'), 'title' => '添加文章(Add)'),
                    array('link' => U('Admin-Article/index'), 'title' => '管理文章(Articles)'),
                    array('link' => U('Admin-Article/cates'), 'title' => '管理分类(Categories)'),
                )
            ),
            array(
                'id' => 1,
                'top_title' => '医院专家管理',
                'display' => 'block',
                'list' => array(
                    array('link' => U('Admin-Expert/editExpert'), 'title' => '添加医院专家(Add)'),
                    array('link' => U('Admin-Expert/index'), 'title' => '医院专家(Expert)'),
                    array('link' => U('Admin-Expert/departments'), 'title' => '医院科室(Departments)'),
                )
            ),
            array(
                'id' => 2,
                'top_title' => '网站设置',
                'display' => 'block',
                'list' => array(
                    array('link' => U('System/editConfig',array('id'=>'1')), 'title' => '医院发展(Develop)'),
                    array('link' => U('System/editConfig',array('id'=>'2')), 'title' => '医院容貌(Face)'),
                    array('link' => U('System/editConfig',array('id'=>'3')), 'title' => '医疗设备(Equip)'),
                    array('link' => U('System/editConfig',array('id'=>'4')), 'title' => '管理机构(Agency)'),
                    array('link' => U('System/editConfig',array('id'=>'5')), 'title' => '现任领导(Leader)'),
                    array('link' => U('System/editConfig',array('id'=>'6')), 'title' => '联系我们(Contact)'),
                )
            ),
            array(
                'id' => 4,
                'top_title' => '商品图片管理',
                'display' => 'none',
                'list' => array(
                    array('link' => U('Attach/editAttach'), 'title' => '上传附件(Upload)'),
                    array('link' => U('Attach/index'), 'title' => '附件管理(Attach)'),
                    array('link' => U('Attach/attach'), 'title' => '文章附件管理(Contain)'),
                )
            ),
            array(
                'id' => 5,
                'top_title' => '管理员管理',
                'display' => 'none',
                'list' => array(
                    array('link' => U('System/editPass'), 'title' => '修改密码(Change)'),
                    array('link' => U('System/editAdmin'), 'title' => '添加管理员(Add)'),
                    array('link' => U('System/admins'), 'title' => '管理员列表(Admins)'),
                )
            ),
            array(
                'id' => 6,
                'top_title' => '缓存清理',
                'display' => 'none',
                'list' => array(
                    array('link' => U('System/webCache'), 'title' => '马上清缓(Cache)'),
                )
            ),
        );
        $this->assign('menu', $menu);
        $this->display();
    }

}

?>
